package com.wxw.BaseLibrary.http;

import com.wxw.BaseLibrary.db.DBTool;
import com.wxw.BaseLibrary.tool.ToolsDate;

/**
 * Created by user on 2016/4/16.
 */
public class DefaultRequestTaskFactory implements IRequestTaskFactory {
    @Override
    public IRequestTask createRequestTask(RequestManager manager, RequestMessage message) {
        IRequestTask<RequestMessage> task = null;
        if (message.MessageType == RequestMessageType.Download) {
            task = new RequestTask();
        } else {
            task = new UploadRequestTask();
        }
        task.init(manager, message);
        return task;
    }
}
